"""
Axiom-Boot 爬虫引擎

提供一个高内聚、低耦合、可扩展的爬虫核心框架。
"""

from .models import Item, Target, Response
from .interfaces import Downloader, Extractor, ItemPipeline, ScraperMiddleware
from .engine import ScraperEngine
from .decorators import scraper
from .exceptions import ScraperException, DownloadError, ParsingError, ExtractionError, DropItem
from .middlewares.logging_middleware import LoggingMiddleware
from .middlewares.retry_middleware import RetryMiddleware
from .middlewares.proxy_middleware import ProxyMiddleware
from .rate_limit_middleware import RateLimitingMiddleware

__all__ = [
    # 核心引擎
    "ScraperEngine",

    # 核心接口 (用于用户实现)
    "Downloader",
    "Extractor",
    "ItemPipeline",
    "ScraperMiddleware",

    # 核心数据模型
    "Item",
    "Target",
    "Response",

    # 核心装饰器
    "scraper",

    # 内置中间件
    "LoggingMiddleware",
    "RetryMiddleware",
    "ProxyMiddleware",
    "RateLimitingMiddleware",

    # 公共异常
    "ScraperException",
    "DownloadError",
    "ParsingError",
    "ExtractionError",
    "DropItem",
] 